.parent {
    position: relative;
    background-color: #4f4fd6;
    width: 300px;
    height: 300px;
}
.child {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 100px;
    width: 100px;
    background-color: #b620cd;
}

body {
    margin: 0;
    display: flex;
    height: 100vh;/*这个设置的作用是为了设置元素的高度为浏览器的整个窗口高度也就是100%*/
    justify-content: center;
    align-items: center;
}